Home

Operator Usage

Name

print

Description

print ket
print the given ket to standard out, appending a new line
often used with the infix operators _ and __ which join ket labels, where __ inserts an extra space
also frequently used with the smerge[] operator
print returns the input ket, so it can be chained with other operators


Examples

print |Just a short sentence.>
    Just a short sentence.
    |Just a short sentence.>
print (|A> __ |short> __ |example> _ |.>)
    A short example.
    |A short example.>

print smerge[", "] (|a> . |b> . |c>)
    a, b, c
    |a, b, c>


See also

Operator type

ket normal